package edu.sctu.practice.class01.wujiayi.assing02.circle;

/**
 * Created by acer1 on 2015/10/8.
 */
public class Circle {
    private  float radius;
    public double circlearea;
    public float Pi = (float) 3.14;
    public static int numOfObjects = 0;

    public Circle(float radius) {

        if (this.radius != radius) {

            numOfObjects = numOfObjects + 1;

        }

        System.out.println("所创建圆个数为" + numOfObjects);

        this.radius = radius;

    }

    public void circleArea() {

        circlearea = 2 * radius * radius * Pi;

        System.out.println("所求圆的面积为" + circlearea + "平方厘米");

    }

}
